<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>test_communication_success_and_is_mobile_device (WaplTest)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File test/test_wapl.rb, line 43</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_communication_success_and_is_mobile_device</span>
    <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@real_key</span>.<span class="ruby-identifier">empty?</span>
      <span class="ruby-identifier">wapl</span> = <span class="ruby-constant">Wapl</span>.<span class="ruby-identifier">new</span> <span class="ruby-ivar">@real_key</span>, {<span class="ruby-value str">&quot;HTTP-User-Agent&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C25 Safari/419.3&quot;</span>}
      <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">wapl</span>.<span class="ruby-identifier">is_mobile_device</span>
      <span class="ruby-identifier">assert_no_match</span>(<span class="ruby-regexp re">/Developer key authentication error/i</span>, <span class="ruby-identifier">resp</span>)
      <span class="ruby-identifier">assert_equal</span> <span class="ruby-identifier">resp</span>, <span class="ruby-value str">'1'</span>
    <span class="ruby-keyword kw">end</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>